import ProductCard from '../productCard/index.jsx'

const PullRefreshList = ({data, click}) => {
  const pullOnClick = value => {
    click(value)
  }
  return (
    <div>
      {data &&
        data.map((item, index) => (
          <div key={index} onClick={() => pullOnClick(item.id)}>
            <ProductCard items={item} />
          </div>
        ))}
    </div>
  )
}

export default PullRefreshList
